package router

import (
	"github.com/gin-gonic/gin"
	"web_end/api"
)

func InitGroupRouter(router *gin.RouterGroup) {
	groupGroup := router.Group("group")
	{
		groupGroup.POST("/create", api.CreateGroup)
		groupGroup.GET("/id/:id", api.GetGroupById)
		groupGroup.GET("/name/:name", api.GetGroupByName)
		groupGroup.PUT("/info", api.UpdateGroup)
		groupGroup.DELETE("/item", api.DeleteGroup)
		groupGroup.POST("/member/join", api.JoinGroup)
		groupGroup.DELETE("/member/exit", api.ExitGroup)
		groupGroup.GET("/member/:id", api.GetMemberList)

	}
}
